<?php

use Carbon\Carbon;
use Illuminate\Database\Seeder;

/**
 * 定义系统模块
 *
 * Date: 21/03/2018
 * @author George
 */
class ModulesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$modules = [
    		[
    			'code' => 'company',
    			'parent_code' => 'top',
    			'name' => '企业管理',
    			'introduction' => '用于管理企业内部信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'attendance',
    			'parent_code' => 'top',
    			'name' => '考勤管理',
    			'introduction' => '用于管理企业人员考勤信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'security',
    			'parent_code' => 'top',
    			'name' => '安保管理',
    			'introduction' => '用于管理企业的安保项目巡检信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'conference',
    			'parent_code' => 'top',
    			'name' => '会议管理',
    			'introduction' => '用于管理企业内部的会议记录',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'training',
    			'parent_code' => 'top',
    			'name' => '培训管理',
    			'introduction' => '用于管理企业内部员工培训管理和统计',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'culture',
    			'parent_code' => 'top',
    			'name' => '内容管理',
    			'introduction' => '用于管理企业内部的人文信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'finance',
    			'parent_code' => 'top',
    			'name' => '财务管理',
    			'introduction' => '用于管理企业财务信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'wages',
    			'parent_code' => 'top',
    			'name' => '薪资管理',
    			'introduction' => '用于管理企业薪资信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'system',
    			'parent_code' => 'top',
    			'name' => '系统设置',
    			'introduction' => '用于设置系统基础数据',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'logs',
    			'parent_code' => 'top',
    			'name' => '操作日志',
    			'introduction' => '用于查看系统操作日志',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'project',
    			'parent_code' => 'company',
    			'name' => '项目管理',
    			'introduction' => '用于管理公司项目信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'consociation',
    			'parent_code' => 'company',
    			'name' => '合作管理',
    			'introduction' => '用于管理公司项目合作信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'department',
    			'parent_code' => 'company',
    			'name' => '部门管理',
    			'introduction' => '用于管理公司部门信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'position',
    			'parent_code' => 'company',
    			'name' => '岗位管理',
    			'introduction' => '用于管理公司岗位信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'staff',
    			'parent_code' => 'company',
    			'name' => '人员管理',
    			'introduction' => '用于管理公司人员信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'transfer',
    			'parent_code' => 'staff',
    			'name' => '人员调动',
    			'introduction' => '用于管理公司人员调动信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'button',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'career',
    			'parent_code' => 'staff',
    			'name' => '职业生涯',
    			'introduction' => '用于管理公司人员职业生涯信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'button',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'attendance_report',
    			'parent_code' => 'attendance',
    			'name' => '考勤报表',
    			'introduction' => '用于管理公司人员考勤信息',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'modify_attendance_report',
    			'parent_code' => 'attendance_report',
    			'name' => '修改考勤报表',
    			'introduction' => '用于管理公司人员考勤信息',
    			'pricing' => 500,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'button',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'attendance_project_exception',
    			'parent_code' => 'attendance',
    			'name' => '项目异常报表',
    			'introduction' => '管理项目维度考勤异常报表',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'attendance_setting',
    			'parent_code' => 'attendance',
    			'name' => '考勤设置',
    			'introduction' => '管理考勤设置',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'scheduling',
    			'parent_code' => 'attendance',
    			'name' => '考勤排班',
    			'introduction' => '考勤排班管理',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection',
    			'parent_code' => 'security',
    			'name' => '巡检管理',
    			'introduction' => '巡检管理',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'reporting',
    			'parent_code' => 'security',
    			'name' => '报岗管理',
    			'introduction' => '报岗管理',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection_line',
    			'parent_code' => 'inspection',
    			'name' => '线路设置',
    			'introduction' => '线路设置',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection_circle',
    			'parent_code' => 'inspection',
    			'name' => '圈数设置',
    			'introduction' => '圈数设置',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection_point',
    			'parent_code' => 'inspection',
    			'name' => '点位设置',
    			'introduction' => '点位设置',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection_report',
    			'parent_code' => 'inspection',
    			'name' => '巡检报表',
    			'introduction' => '巡检报表',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'inspection_exception',
    			'parent_code' => 'inspection',
    			'name' => '巡检异常',
    			'introduction' => '巡检异常',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'reporting_point',
    			'parent_code' => 'reporting',
    			'name' => '岗位点设置',
    			'introduction' => '岗位点设置',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'reporting_statistics',
    			'parent_code' => 'reporting',
    			'name' => '报岗报表',
    			'introduction' => '报岗报表',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'reporting_statistics_exception',
    			'parent_code' => 'reporting_statistics',
    			'name' => '异常统计报表',
    			'introduction' => '异常统计报表',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'button',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'conference_report',
    			'parent_code' => 'conference',
    			'name' => '会议报表',
    			'introduction' => '会议报表',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
    			'code' => 'training_manager',
    			'parent_code' => 'training',
    			'name' => '培训管理',
    			'introduction' => '培训管理',
    			'pricing' => 0,
    			'icon' => null,
    			'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
    			'created_at' => Carbon::now(),
    			'updated_at' => Carbon::now(),
			],[
				'code' => 'banner',
				'parent_code' => 'culture',
				'name' => 'Banner管理',
				'introduction' => 'Banner管理',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'article',
				'parent_code' => 'culture',
				'name' => '心灵驿站',
				'introduction' => '心灵驿站',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'notification',
				'parent_code' => 'culture',
				'name' => '通知管理',
				'introduction' => '通知管理',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'finance_overview',
				'parent_code' => 'finance',
				'name' => '财务总览',
				'introduction' => '通知管理',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'wages_pattern',
				'parent_code' => 'wages',
				'name' => '薪资方案',
				'introduction' => '薪资方案',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'wages_report',
				'parent_code' => 'wages',
				'name' => '薪资报表',
				'introduction' => '薪资报表',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'register_setting',
				'parent_code' => 'system',
				'name' => '注册设置',
				'introduction' => '注册设置',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],[
				'code' => 'infrastructure_setting',
				'parent_code' => 'system',
				'name' => '基础数据设置',
				'introduction' => '基础数据设置',
				'pricing' => 0,
				'icon' => null,
				'cover' => null,
				'status' => 1,
				'type' => 'menu',
				'order' => 1,
				'created_at' => Carbon::now(),
				'updated_at' => Carbon::now(),
			],
		];

    	DB::table('modules')->insert($modules);
    }
}
